<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
    <title>采购单历史记录</title>
    <link rel="stylesheet" href="../css/style.css"/>
    <link rel="stylesheet" href="../css/font-awesome.min.css"/>
</head>
<body>
<div class="container">
    <div class="header">
        <a href="../index.html"><i class="icon-angle-left icon-large"></i></a>采购单历史记录
    </div>
    <div class="main" style="overflow-y: auto">
        <div id="wrapper">
            <div id="scroller">
                <div id="pullDown">
                    <span class="pullDownLabel">下拉刷新</span>
                </div>
                <div id="thelist">

                    <a href="cangoudanxq.html" class="sgls-item mt1">
                        <p>
                            <span class="title">采购订单号：</span><span>D0000001</span>
                        </p>

                        <p>
                            <span class="title pull-left">供应商：</span><span class="span4">可口可乐可口可乐可口可乐可口可乐可口可乐</span>
                            <span class="pull-right"><i class="title">金额：</i><i class="text-nowrap">63800.00</i></span>
                        </p>

                        <p>
                            <span class="title">下单时间：</span><span>2016.7.22 16:00</span>
                            <span class="pull-right"><i class="title">下单人：</i><i>李小姐</i></span>
                        </p>

                        <p>
                            <span class="title">到货时间：</span><span>2016.7.22</span>
                        </p>
                    </a>
                    <a href="cangoudanxq.html" class="sgls-item mt1">
                        <p>
                            <span class="title">采购订单号：</span><span>D0000001</span>
                        </p>

                        <p>
                            <span class="title pull-left">供应商：</span><span class="span4">可口可乐可口可乐可口可乐可口可乐可口可乐</span>
                            <span class="pull-right"><i class="title">金额：</i><i class="text-nowrap">63800.00</i></span>
                        </p>

                        <p>
                            <span class="title">下单时间：</span><span>2016.7.22 16:00</span>
                            <span class="pull-right"><i class="title">下单人：</i><i>李小姐</i></span>
                        </p>

                        <p>
                            <span class="title">到货时间：</span><span>2016.7.22</span>
                        </p>
                    </a>
                </div>
                <div id="pullUp">
                    <span class="pullUpLabel">上拉加载更多</span>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../js/zepto.min.js"></script>
<script src="../js/msgBox.js"></script>
<script src="../js/iscroll.js"></script>
<script src="../js/iscroll-main.js"></script>
<script>
    $(function () {
        $('.chexiao').on('click', function () {
            $.msgbox({
                msgContent: '确认撤销该申购单',
                cancel: function () {
                },
                submit: function () {
                },
                close: false
            });
            return false;
        })
    });
    //初始状态，加载数据
    function loadAction() {
        var el, item;
        el = document.getElementById('thelist');
        for (var i = 0; i < 10; i++) {
            item = document.createElement('div');
            item.innerHTML = "<a href='cangoudanxq.html' class='sgls-item mt1'>" +
                    "<p>" +
                    "<span class='title'>采购订单号：</span><span>D0000001</span>" +
                    "</p>" +
                    "<p>" +
                    "<span class='title pull-left'>供应商：</span><span class='span4'>可口可乐可口可乐可口可乐可口可乐可口可乐</span>" +
                    "<span class=pull-right><i class='title>金额：</i><i class='text-nowrap'>63800.00</i></span>" +
                    "</p>" +
                    "<p>" +
                    "<span class='title'>下单时间：</span><span>2016.7.22 16:00</span>" +
                    "<span class='pull-right'><i class='title'>下单人：</i><i>李小姐</i></span>" +
                    "</p>" +
                    "<p>" +
                    "<span class='title'>到货时间：</span><span>2016.7.22</span>" +
                    "</p>" +
                    "</a>";
            el.appendChild(item, el.childNodes[0]);
        }
        myScroll.refresh();
    }

    //下拉刷新当前数据
    function pullDownAction() {
        setTimeout(function () {
            //这里执行刷新操作

            myScroll.refresh();
        }, 400);
    }

    //上拉加载更多数据
    function pullUpAction() {
        setTimeout(function () {
            var el, item;
            el = document.getElementById('thelist');
            for (var i = 0; i < 10; i++) {
                item = document.createElement('div');
                item.innerHTML = "<a href='cangoudanxq.html' class='sgls-item mt1'>" +
                        "<p>" +
                        "<span class='title'>采购订单号：</span><span>D0000001</span>" +
                        "</p>" +
                        "<p>" +
                        "<span class='title pull-left'>供应商：</span><span class='span4'>可口可乐可口可乐可口可乐可口可乐可口可乐</span>" +
                        "<span class=pull-right><i class='title>金额：</i><i class='text-nowrap'>63800.00</i></span>" +
                        "</p>" +
                        "<p>" +
                        "<span class='title'>下单时间：</span><span>2016.7.22 16:00</span>" +
                        "<span class='pull-right'><i class='title'>下单人：</i><i>李小姐</i></span>" +
                        "</p>" +
                        "<p>" +
                        "<span class='title'>到货时间：</span><span>2016.7.22</span>" +
                        "</p>" +
                        "</a>";
                el.appendChild(item, el.childNodes[0]);
            }
            myScroll.refresh();
        }, 400);
    }
</script>
</body>
</html>